package com.haochang.chunkvod.view.vod.dialog;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 *     @author Yangjie
 *     className ActivityDialogItemInfo
 *     created at  2016/8/27  17:43
 *     咨客 选择活动item
 */
public class ActivityDialogItemInfo implements Parcelable
{
	private String id="";
	private String number="";
	private String code="";
	private String unit="";
	private String name="";
	private String content="";
	private boolean isSelected = false;
	private List<BaseDialogItemInfo> list = new ArrayList<BaseDialogItemInfo>();

	protected ActivityDialogItemInfo(Parcel in) {
		id = in.readString();
		number = in.readString();
		code = in.readString();
		unit = in.readString();
		name = in.readString();
		content = in.readString();
		isSelected = in.readByte() != 0;
		list = in.createTypedArrayList(BaseDialogItemInfo.CREATOR);
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(number);
		dest.writeString(code);
		dest.writeString(unit);
		dest.writeString(name);
		dest.writeString(content);
		dest.writeByte((byte) (isSelected ? 1 : 0));
		dest.writeTypedList(list);
	}

	@Override
	public int describeContents() {
		return 0;
	}

	public static final Creator<ActivityDialogItemInfo> CREATOR = new Creator<ActivityDialogItemInfo>() {
		@Override
		public ActivityDialogItemInfo createFromParcel(Parcel in) {
			return new ActivityDialogItemInfo(in);
		}

		@Override
		public ActivityDialogItemInfo[] newArray(int size) {
			return new ActivityDialogItemInfo[size];
		}
	};

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public List<BaseDialogItemInfo> getList()
	{
		return list;
	}

	public String getId()
	{
		return id;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public void setList(List<BaseDialogItemInfo> list)
	{
		this.list = list;
	}

	public String getCode()
	{
		return code;
	}

	public void setCode(String code)
	{
		this.code = code;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public boolean isSelected()
	{
		return isSelected;
	}

	public void setSelected(boolean selected)
	{
		isSelected = selected;
	}

	public String getUnit()
	{
		return unit;
	}

	public void setUnit(String unit)
	{
		this.unit = unit;
	}

	public String getNumber()
	{
		return number;
	}

	public void setNumber(String number)
	{
		this.number = number;
	}

	public ActivityDialogItemInfo(String code, String name, boolean isSelected)
	{
		this.code = code;
		this.name = name;
		this.isSelected = isSelected;
	}

	public ActivityDialogItemInfo(String name, boolean isSelected)
	{
		this.name = name;
		this.isSelected = isSelected;
	}

	public ActivityDialogItemInfo()
	{
	}
}
